Skip to content

fix(red-team): correct Network Broker ChannelStats field names#199

Merged
cdot65 merged 1 commit into
mainfrom
cdot65/fix/network-broker-stats-schema
Jul 9, 2026
Merged

fix(red-team): correct Network Broker ChannelStats field names#199
cdot65 merged 1 commit into
mainfrom
cdot65/fix/network-broker-stats-schema

Conversation

@cdot65

@cdot65 cdot65 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Closes #198

What

getChannelStats()'s typed fields all returned undefined against the live API — the ChannelStats schema was built from the PRD's prose, not the network-broker OpenAPI. Found by running a read-only script against a live tenant.

Fix

  • ChannelStats field names corrected to the real API: network_channels_server_domain, docker_registry, helm_chart, docker_image, online_channels, total_channels, plus client_version.
  • Channel enriched with live-observed fields: added_by, last_online_at, connected_clients_count, outdated_clients_count, features.
  • Committed specs/AIRS-Red-Teaming-Network-Broker.yaml so preflight validates these schemas going forward (this is why the bug slipped through originally — the spec wasn't in the repo).
  • Allowlisted the coincidental ErrorResponse name collision (the SDK's ErrorResponse models the AIRS scan error envelope, unrelated to the network-broker component of the same name) and the live-only fields the base spec omits.
  • Updated the model/client tests, the runnable example, and the guide snippet.

Verification

  • Live: re-ran the read-only script against a real tenant — stats now populate (online/total: 1/2, real registry/chart/image, client_version: 1.4.0).
  • format:check, lint, typecheck, preflight (0 unacknowledged; 102 acknowledged), docs:check, full Vitest (1351) all green locally.

Patch — corrects a broken response contract; no API surface change.

🤖 Generated with Claude Code

The ChannelStats schema was modeled from PRD prose, not the network-broker
OpenAPI, so getChannelStats() typed accessors all returned undefined against
the live API. Rename to the real fields (network_channels_server_domain,
docker_registry, helm_chart, docker_image, online_channels, total_channels,
client_version) and enrich Channel with added_by/last_online_at/
connected_clients_count/outdated_clients_count/features. Commit the
network-broker spec so preflight validates these (allowlist the coincidental
ErrorResponse name collision + live-only extra fields). Verified live.

Closes #198
@cdot65
cdot65 merged commit 17620f4 into main Jul 9, 2026
4 checks passed
@cdot65
cdot65 deleted the cdot65/fix/network-broker-stats-schema branch July 9, 2026 09:09
@cdot65 cdot65 mentioned this pull request Jul 9, 2026
cdot65 added a commit that referenced this pull request Jul 9, 2026
- feat(red-team): Network Broker channel sub-client (#187)
- feat(red-team): supported-languages and target-profile error-log endpoints (#193)
- feat(model-security): read-only models sub-client (#195)
- fix(management): percent-encode TSG ID in customer-apps list path (#189)
- fix(red-team): correct Network Broker ChannelStats field names (#199)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(red-team): Network Broker ChannelStats field names don't match the live API

1 participant